\hypertarget{utils_8h}{\section{utils.\-h File Reference}
\label{utils_8h}\index{utils.\-h@{utils.\-h}}
}
{\ttfamily \#include $<$assert.\-h$>$}\\*
{\ttfamily \#include $<$stdio.\-h$>$}\\*
{\ttfamily \#include $<$errno.\-h$>$}\\*
{\ttfamily \#include $<$stdlib.\-h$>$}\\*
{\ttfamily \#include $<$stdbool.\-h$>$}\\*
{\ttfamily \#include $<$string.\-h$>$}\\*
{\ttfamily \#include $<$sys/types.\-h$>$}\\*
{\ttfamily \#include $<$sys/socket.\-h$>$}\\*
{\ttfamily \#include $<$unistd.\-h$>$}\\*
{\ttfamily \#include \char`\"{}storage.\-h\char`\"{}}\\*
{\ttfamily \#include $<$time.\-h$>$}\\*
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structconfig__params}{config\-\_\-params}
\begin{DoxyCompactList}\small\item\em A structure to store the configuration file's parameters. \end{DoxyCompactList}\item 
struct \hyperlink{structcheck__duplmis}{check\-\_\-duplmis}
\begin{DoxyCompactList}\small\item\em A structure to check if there is duplicate or missing parameter names. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{utils_8h_a1eb73c104b484cf18752169509cebfe2}{\#define \hyperlink{utils_8h_a1eb73c104b484cf18752169509cebfe2}{M\-A\-X\-\_\-\-C\-M\-D\-\_\-\-L\-E\-N}~(1024 $\ast$ 8)}\label{utils_8h_a1eb73c104b484cf18752169509cebfe2}

\begin{DoxyCompactList}\small\item\em maximum command's length given by client to server \end{DoxyCompactList}\item 
\hypertarget{utils_8h_af855c94dc540e943632089ce7496faac}{\#define \hyperlink{utils_8h_af855c94dc540e943632089ce7496faac}{L\-O\-G}(x)~\{printf x; fflush(stdout);\}}\label{utils_8h_af855c94dc540e943632089ce7496faac}

\begin{DoxyCompactList}\small\item\em printf x to stdout, flush without needing '\par
' character \end{DoxyCompactList}\item 
\hypertarget{utils_8h_a32adf79142f0a426b5e782fb7cd4cad3}{\#define {\bfseries D\-B\-G}(x)~\{printf x; fflush(stdout);\}}\label{utils_8h_a32adf79142f0a426b5e782fb7cd4cad3}

\item 
\hypertarget{utils_8h_a51d90ea93d4b55e086cb490f7478e684}{\#define {\bfseries M\-A\-X\-\_\-\-M\-S\-G\-\_\-\-L\-E\-N}~80}\label{utils_8h_a51d90ea93d4b55e086cb490f7478e684}

\item 
\hypertarget{utils_8h_a497f67978d53858accb67015e898458c}{\#define {\bfseries D\-E\-F\-A\-U\-L\-T\-\_\-\-C\-R\-Y\-P\-T\-\_\-\-S\-A\-L\-T}~\char`\"{}xx\char`\"{}}\label{utils_8h_a497f67978d53858accb67015e898458c}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{utils_8h_a1b2cb5b7b1f2196710b7695c79345c72}{initial\-Check} (struct \hyperlink{structcheck__duplmis}{check\-\_\-duplmis} $\ast$check)
\begin{DoxyCompactList}\small\item\em An initializing function to set configs to 0. \end{DoxyCompactList}\item 
int \hyperlink{utils_8h_aa4d9633461f1bbdd097ce5e4351d5fe9}{check\-Name} (char $\ast$msg)
\begin{DoxyCompactList}\small\item\em Checks and parses the names of the table and key. \end{DoxyCompactList}\item 
int \hyperlink{utils_8h_adb3838ec27819f73099dee21600d9e6e}{check\-Value} (char $\ast$msg)
\begin{DoxyCompactList}\small\item\em Checks and parses the value pertaining to a key and table. \end{DoxyCompactList}\item 
int \hyperlink{utils_8h_acfa156e0a6b7e2e97a30a0e758ae9bf6}{get\-Line} (char $\ast$output, int max)
\begin{DoxyCompactList}\small\item\em Gets a line from std in to parameter output up to max. \end{DoxyCompactList}\item 
int \hyperlink{utils_8h_a4749d2382b87219e9a807a6e4b03b5b9}{num\-Digits} (int number)
\begin{DoxyCompactList}\small\item\em Returns number of digits number contains. E\-X\-: 1234 returns 4, 0 returns 1. \end{DoxyCompactList}\item 
int \hyperlink{utils_8h_a73c4a410d877b6a9358c547786f2102c}{sendall} (const int sock, const char $\ast$buf, const size\-\_\-t len)
\item 
int \hyperlink{utils_8h_ab126c8228ad72abbaed5f282709446ab}{recvline} (const int sock, char $\ast$buf, const size\-\_\-t buflen)
\item 
\hypertarget{utils_8h_a1929442fc6c4080b1fac19798cd7ff40}{int \hyperlink{utils_8h_a1929442fc6c4080b1fac19798cd7ff40}{read\-\_\-config} (const char $\ast$config\-\_\-file, struct \hyperlink{structconfig__params}{config\-\_\-params} $\ast$params, struct \hyperlink{structcheck__duplmis}{check\-\_\-duplmis} $\ast$check)}\label{utils_8h_a1929442fc6c4080b1fac19798cd7ff40}

\begin{DoxyCompactList}\small\item\em This function reads from the config file. \end{DoxyCompactList}\item 
int \hyperlink{utils_8h_af1fc75cd97fa400571647b2f2dacc5fd}{process\-\_\-config\-\_\-line} (char $\ast$line, struct \hyperlink{structconfig__params}{config\-\_\-params} $\ast$params, struct \hyperlink{structcheck__duplmis}{check\-\_\-duplmis} $\ast$check)
\item 
\hypertarget{utils_8h_a9e4d8cb085fc7d5c9093ee102fa886d1}{void \hyperlink{utils_8h_a9e4d8cb085fc7d5c9093ee102fa886d1}{logger} (F\-I\-L\-E $\ast$file, char $\ast$message)}\label{utils_8h_a9e4d8cb085fc7d5c9093ee102fa886d1}

\begin{DoxyCompactList}\small\item\em To log messages. \end{DoxyCompactList}\item 
void \hyperlink{utils_8h_afe0358d2485f7ecfb72aac9731c0ae83}{Fclose} (int \hyperlink{utils_8h_a9e4d8cb085fc7d5c9093ee102fa886d1}{logger}, int server\-File)
\begin{DoxyCompactList}\small\item\em To close the logging files. \end{DoxyCompactList}\item 
void \hyperlink{utils_8h_a2a0e843767aeea4f433a28b9c54f573a}{menu} ()
\begin{DoxyCompactList}\small\item\em Prints out the user menu. \end{DoxyCompactList}\item 
int \hyperlink{utils_8h_a7863bd8ef1b832f553899496a19bc38a}{Socket} (int family, int type, int protocol)
\begin{DoxyCompactList}\small\item\em Creates a socket. \end{DoxyCompactList}\item 
int \hyperlink{utils_8h_a9f7002b60d38cfb4dfa67a027821590d}{Accept} (int fd, struct sockaddr $\ast$sa, socklen\-\_\-t $\ast$salenptr)
\begin{DoxyCompactList}\small\item\em Accepts a peer socket. \end{DoxyCompactList}\item 
void \hyperlink{utils_8h_a3197ea5e0c5191e84754c9e1a3e6fada}{Bind} (int fd, const struct sockaddr $\ast$sa, socklen\-\_\-t salen)
\begin{DoxyCompactList}\small\item\em Binds a host socket to the server. \end{DoxyCompactList}\item 
int \hyperlink{utils_8h_a79ae5cd16901486c4dd6c56f12d4d751}{Connect\-Serv} (int fd, const struct sockaddr $\ast$sa, socklen\-\_\-t salen)
\begin{DoxyCompactList}\small\item\em This function connects to a host socket. \end{DoxyCompactList}\item 
void \hyperlink{utils_8h_ae77e75c563c8b6851e401620f423496e}{Listen} (int fd, int backlog)
\begin{DoxyCompactList}\small\item\em This function listens for peer sockets. \end{DoxyCompactList}\item 
void \hyperlink{utils_8h_ade6d4842f21ea284e126636e424e6614}{Close} (int fd)
\begin{DoxyCompactList}\small\item\em Closes the connection between client and server. \end{DoxyCompactList}\item 
\hypertarget{utils_8h_aa26d27a9072e93c052cb0c7fca7909f7}{char $\ast$ \hyperlink{utils_8h_aa26d27a9072e93c052cb0c7fca7909f7}{generate\-\_\-encrypted\-\_\-password} (const char $\ast$passwd, const char $\ast$salt)}\label{utils_8h_aa26d27a9072e93c052cb0c7fca7909f7}

\begin{DoxyCompactList}\small\item\em This function generates an encrypted password. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{utils_8h_af26b360116d78e08645bcf13aa56ae72}{static const char {\bfseries C\-O\-N\-F\-I\-G\-\_\-\-C\-O\-M\-M\-E\-N\-T\-\_\-\-C\-H\-A\-R} = '\#'}\label{utils_8h_af26b360116d78e08645bcf13aa56ae72}

\item 
\hypertarget{utils_8h_aaad504d4c9e29deb8f206fe151eebef2}{char {\bfseries message} \mbox{[}M\-A\-X\-\_\-\-M\-S\-G\-\_\-\-L\-E\-N+1\mbox{]}}\label{utils_8h_aaad504d4c9e29deb8f206fe151eebef2}

\item 
\hypertarget{utils_8h_ae81ca8cf95a9afb0692457ad1e721443}{F\-I\-L\-E $\ast$ {\bfseries file\-Server}}\label{utils_8h_ae81ca8cf95a9afb0692457ad1e721443}

\item 
\hypertarget{utils_8h_aae709fb4361ed27d229885bf09201064}{F\-I\-L\-E $\ast$ {\bfseries file\-Client}}\label{utils_8h_aae709fb4361ed27d229885bf09201064}

\item 
\hypertarget{utils_8h_acfdfefef00962c1b6fb04ccbf9d341aa}{char $\ast$$\ast$ {\bfseries tables}}\label{utils_8h_acfdfefef00962c1b6fb04ccbf9d341aa}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
This file is used to setup configuration file, send and receive data between networks, log messages to file, and encrypt passwords 

Definition in file \hyperlink{utils_8h_source}{utils.\-h}.



\subsection{Function Documentation}
\hypertarget{utils_8h_a9f7002b60d38cfb4dfa67a027821590d}{\index{utils.\-h@{utils.\-h}!Accept@{Accept}}
\index{Accept@{Accept}!utils.h@{utils.\-h}}
\subsubsection[{Accept}]{\setlength{\rightskip}{0pt plus 5cm}int Accept (
\begin{DoxyParamCaption}
\item[{int}]{fd, }
\item[{struct sockaddr $\ast$}]{sa, }
\item[{socklen\-\_\-t $\ast$}]{salenptr}
\end{DoxyParamCaption}
)}}\label{utils_8h_a9f7002b60d38cfb4dfa67a027821590d}


Accepts a peer socket. 

This function accepts a peer socket that is trying to connect 

Definition at line 887 of file utils.\-c.



Referenced by newconnection().

\hypertarget{utils_8h_a3197ea5e0c5191e84754c9e1a3e6fada}{\index{utils.\-h@{utils.\-h}!Bind@{Bind}}
\index{Bind@{Bind}!utils.h@{utils.\-h}}
\subsubsection[{Bind}]{\setlength{\rightskip}{0pt plus 5cm}void Bind (
\begin{DoxyParamCaption}
\item[{int}]{fd, }
\item[{const struct sockaddr $\ast$}]{sa, }
\item[{socklen\-\_\-t}]{salen}
\end{DoxyParamCaption}
)}}\label{utils_8h_a3197ea5e0c5191e84754c9e1a3e6fada}


Binds a host socket to the server. 

This function binds a host socket to the server 

Definition at line 903 of file utils.\-c.

\hypertarget{utils_8h_aa4d9633461f1bbdd097ce5e4351d5fe9}{\index{utils.\-h@{utils.\-h}!check\-Name@{check\-Name}}
\index{check\-Name@{check\-Name}!utils.h@{utils.\-h}}
\subsubsection[{check\-Name}]{\setlength{\rightskip}{0pt plus 5cm}int check\-Name (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{msg}
\end{DoxyParamCaption}
)}}\label{utils_8h_aa4d9633461f1bbdd097ce5e4351d5fe9}


Checks and parses the names of the table and key. 

This function ensures that the string msg does only contains alphanumeric characters It is used for checking table names and keys \begin{DoxyReturn}{Returns}
1 if it satisfies all requirements 0 if it does not 
\end{DoxyReturn}


Definition at line 815 of file utils.\-c.



Referenced by process\-\_\-config\-\_\-line(), storage\-\_\-get(), and storage\-\_\-set().

\hypertarget{utils_8h_adb3838ec27819f73099dee21600d9e6e}{\index{utils.\-h@{utils.\-h}!check\-Value@{check\-Value}}
\index{check\-Value@{check\-Value}!utils.h@{utils.\-h}}
\subsubsection[{check\-Value}]{\setlength{\rightskip}{0pt plus 5cm}int check\-Value (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{msg}
\end{DoxyParamCaption}
)}}\label{utils_8h_adb3838ec27819f73099dee21600d9e6e}


Checks and parses the value pertaining to a key and table. 

This function ensures that the string msg does only contains alphanumeric characters or space It is used for checking record values \begin{DoxyReturn}{Returns}
1 if it satisfies all requirements 0 if it does not 
\end{DoxyReturn}


Definition at line 785 of file utils.\-c.



Referenced by storage\-\_\-set().

\hypertarget{utils_8h_ade6d4842f21ea284e126636e424e6614}{\index{utils.\-h@{utils.\-h}!Close@{Close}}
\index{Close@{Close}!utils.h@{utils.\-h}}
\subsubsection[{Close}]{\setlength{\rightskip}{0pt plus 5cm}void Close (
\begin{DoxyParamCaption}
\item[{int}]{fd}
\end{DoxyParamCaption}
)}}\label{utils_8h_ade6d4842f21ea284e126636e424e6614}


Closes the connection between client and server. 

This function closes a file descriptor 

Definition at line 963 of file utils.\-c.

\hypertarget{utils_8h_a79ae5cd16901486c4dd6c56f12d4d751}{\index{utils.\-h@{utils.\-h}!Connect\-Serv@{Connect\-Serv}}
\index{Connect\-Serv@{Connect\-Serv}!utils.h@{utils.\-h}}
\subsubsection[{Connect\-Serv}]{\setlength{\rightskip}{0pt plus 5cm}int Connect\-Serv (
\begin{DoxyParamCaption}
\item[{int}]{fd, }
\item[{const struct sockaddr $\ast$}]{sa, }
\item[{socklen\-\_\-t}]{salen}
\end{DoxyParamCaption}
)}}\label{utils_8h_a79ae5cd16901486c4dd6c56f12d4d751}


This function connects to a host socket. 

This function connects to a host socket 

Definition at line 917 of file utils.\-c.

\hypertarget{utils_8h_afe0358d2485f7ecfb72aac9731c0ae83}{\index{utils.\-h@{utils.\-h}!Fclose@{Fclose}}
\index{Fclose@{Fclose}!utils.h@{utils.\-h}}
\subsubsection[{Fclose}]{\setlength{\rightskip}{0pt plus 5cm}void Fclose (
\begin{DoxyParamCaption}
\item[{int}]{logger, }
\item[{int}]{server\-File}
\end{DoxyParamCaption}
)}}\label{utils_8h_afe0358d2485f7ecfb72aac9731c0ae83}


To close the logging files. 

This function closes a file if logger was 2 
\begin{DoxyParams}{Parameters}
{\em logger} & is the logging number defined \\
\hline
{\em server\-File} & is the file to be closed, 1 is if it the server\-File, 0 if it is the client\-File \\
\hline
\end{DoxyParams}


Definition at line 742 of file utils.\-c.



Referenced by main().

\hypertarget{utils_8h_acfa156e0a6b7e2e97a30a0e758ae9bf6}{\index{utils.\-h@{utils.\-h}!get\-Line@{get\-Line}}
\index{get\-Line@{get\-Line}!utils.h@{utils.\-h}}
\subsubsection[{get\-Line}]{\setlength{\rightskip}{0pt plus 5cm}int get\-Line (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{output, }
\item[{int}]{max}
\end{DoxyParamCaption}
)}}\label{utils_8h_acfa156e0a6b7e2e97a30a0e758ae9bf6}


Gets a line from std in to parameter output up to max. 

This function gets a line from stdin and attach it to output with null terminating it 
\begin{DoxyParams}{Parameters}
{\em output} & is the string buffer to be written on \\
\hline
{\em max} & is how long the string buffer is including '\textbackslash{}0' \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 if successful, 0 if an error occurred such as message passed in was too long 
\end{DoxyReturn}


Definition at line 363 of file utils.\-c.



Referenced by main().

\hypertarget{utils_8h_a1b2cb5b7b1f2196710b7695c79345c72}{\index{utils.\-h@{utils.\-h}!initial\-Check@{initial\-Check}}
\index{initial\-Check@{initial\-Check}!utils.h@{utils.\-h}}
\subsubsection[{initial\-Check}]{\setlength{\rightskip}{0pt plus 5cm}int initial\-Check (
\begin{DoxyParamCaption}
\item[{struct {\bf check\-\_\-duplmis} $\ast$}]{check}
\end{DoxyParamCaption}
)}}\label{utils_8h_a1b2cb5b7b1f2196710b7695c79345c72}


An initializing function to set configs to 0. 

This is the constructor for structure check 

Definition at line 769 of file utils.\-c.



Referenced by main().

\hypertarget{utils_8h_ae77e75c563c8b6851e401620f423496e}{\index{utils.\-h@{utils.\-h}!Listen@{Listen}}
\index{Listen@{Listen}!utils.h@{utils.\-h}}
\subsubsection[{Listen}]{\setlength{\rightskip}{0pt plus 5cm}void Listen (
\begin{DoxyParamCaption}
\item[{int}]{fd, }
\item[{int}]{backlog}
\end{DoxyParamCaption}
)}}\label{utils_8h_ae77e75c563c8b6851e401620f423496e}


This function listens for peer sockets. 

This function listens for peer sockets 

Definition at line 933 of file utils.\-c.

\hypertarget{utils_8h_a2a0e843767aeea4f433a28b9c54f573a}{\index{utils.\-h@{utils.\-h}!menu@{menu}}
\index{menu@{menu}!utils.h@{utils.\-h}}
\subsubsection[{menu}]{\setlength{\rightskip}{0pt plus 5cm}void menu (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{utils_8h_a2a0e843767aeea4f433a28b9c54f573a}


Prints out the user menu. 

This function prints the menu to prompt the user to enter his selection 

Definition at line 759 of file utils.\-c.



Referenced by main().

\hypertarget{utils_8h_a4749d2382b87219e9a807a6e4b03b5b9}{\index{utils.\-h@{utils.\-h}!num\-Digits@{num\-Digits}}
\index{num\-Digits@{num\-Digits}!utils.h@{utils.\-h}}
\subsubsection[{num\-Digits}]{\setlength{\rightskip}{0pt plus 5cm}int num\-Digits (
\begin{DoxyParamCaption}
\item[{int}]{number}
\end{DoxyParamCaption}
)}}\label{utils_8h_a4749d2382b87219e9a807a6e4b03b5b9}


Returns number of digits number contains. E\-X\-: 1234 returns 4, 0 returns 1. 

This function returns the number of digits contain by number 
\begin{DoxyParams}{Parameters}
{\em number} & is the integer to count number of digits \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the number of digits of number 
\end{DoxyReturn}


Definition at line 412 of file utils.\-c.



Referenced by storage\-\_\-connect().

\hypertarget{utils_8h_af1fc75cd97fa400571647b2f2dacc5fd}{\index{utils.\-h@{utils.\-h}!process\-\_\-config\-\_\-line@{process\-\_\-config\-\_\-line}}
\index{process\-\_\-config\-\_\-line@{process\-\_\-config\-\_\-line}!utils.h@{utils.\-h}}
\subsubsection[{process\-\_\-config\-\_\-line}]{\setlength{\rightskip}{0pt plus 5cm}int process\-\_\-config\-\_\-line (
\begin{DoxyParamCaption}
\item[{char $\ast$}]{line, }
\item[{struct {\bf config\-\_\-params} $\ast$}]{params, }
\item[{struct {\bf check\-\_\-duplmis} $\ast$}]{check}
\end{DoxyParamCaption}
)}}\label{utils_8h_af1fc75cd97fa400571647b2f2dacc5fd}
This function processes one line from the config file and stores its value into \hyperlink{structconfig__params}{config\-\_\-params} Called by process\-\_\-config() \begin{DoxyReturn}{Returns}
-\/1 if unsuccessful
\end{DoxyReturn}
This function processes one line in the configuration file // \begin{DoxyNote}{Note}
This function is called by readconfig() 
\end{DoxyNote}


Definition at line 524 of file utils.\-c.



References check\-Name(), E\-R\-R\-\_\-\-U\-N\-K\-N\-O\-W\-N, find\-Table\-Name(), insert\-Table(), and M\-A\-X\-\_\-\-C\-O\-N\-F\-I\-G\-\_\-\-L\-I\-N\-E\-\_\-\-L\-E\-N.



Referenced by read\-\_\-config().

\hypertarget{utils_8h_ab126c8228ad72abbaed5f282709446ab}{\index{utils.\-h@{utils.\-h}!recvline@{recvline}}
\index{recvline@{recvline}!utils.h@{utils.\-h}}
\subsubsection[{recvline}]{\setlength{\rightskip}{0pt plus 5cm}int recvline (
\begin{DoxyParamCaption}
\item[{const int}]{sock, }
\item[{char $\ast$}]{buf, }
\item[{const size\-\_\-t}]{buflen}
\end{DoxyParamCaption}
)}}\label{utils_8h_ab126c8228ad72abbaed5f282709446ab}
This function receives all data from sock 
\begin{DoxyParams}{Parameters}
{\em sock} & The sockfd to be received from \\
\hline
{\em buf} & The buffer to store data received \\
\hline
{\em buflen} & Maximum size to be received\\
\hline
\end{DoxyParams}
This function receives buffer from sock till size buflen and stores into buf. 

Definition at line 447 of file utils.\-c.



Referenced by main(), storage\-\_\-auth(), storage\-\_\-get(), and storage\-\_\-set().

\hypertarget{utils_8h_a73c4a410d877b6a9358c547786f2102c}{\index{utils.\-h@{utils.\-h}!sendall@{sendall}}
\index{sendall@{sendall}!utils.h@{utils.\-h}}
\subsubsection[{sendall}]{\setlength{\rightskip}{0pt plus 5cm}int sendall (
\begin{DoxyParamCaption}
\item[{const int}]{sock, }
\item[{const char $\ast$}]{buf, }
\item[{const size\-\_\-t}]{len}
\end{DoxyParamCaption}
)}}\label{utils_8h_a73c4a410d877b6a9358c547786f2102c}
This function sends all data to sock 
\begin{DoxyParams}{Parameters}
{\em sock} & The connfd to be sent to \\
\hline
{\em buf} & the buffer to store data to be sent \\
\hline
{\em len} & Maximum size of buf to send\\
\hline
\end{DoxyParams}
This function sends all of buffer till size len to sock 

Definition at line 429 of file utils.\-c.



Referenced by handle\-\_\-command(), storage\-\_\-auth(), storage\-\_\-get(), and storage\-\_\-set().

\hypertarget{utils_8h_a7863bd8ef1b832f553899496a19bc38a}{\index{utils.\-h@{utils.\-h}!Socket@{Socket}}
\index{Socket@{Socket}!utils.h@{utils.\-h}}
\subsubsection[{Socket}]{\setlength{\rightskip}{0pt plus 5cm}int Socket (
\begin{DoxyParamCaption}
\item[{int}]{family, }
\item[{int}]{type, }
\item[{int}]{protocol}
\end{DoxyParamCaption}
)}}\label{utils_8h_a7863bd8ef1b832f553899496a19bc38a}


Creates a socket. 

This function creates a socket 

Definition at line 947 of file utils.\-c.

